﻿<Window x:Class="Avarton_Scanner.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:AnimatedGifBehaviorTest"
        Title="Avarton Scanner" Height="768" Width="1366" ResizeMode="NoResize" Opacity="0.95" MaxHeight="768" MaxWidth="1366" WindowStyle="None" Loaded="Window_Loaded" Icon="/Images/AvartonIcon32.ico" Name="mainWindow" WindowStartupLocation="CenterScreen" Topmost="False">
    <Window.Resources>
        <!--Textbox opmaak-->
        <Style TargetType="TextBox" >
            <Setter Property="BorderBrush" Value="White" />
            <Setter Property="BorderThickness" Value="0.5" />
            <Setter Property="Background" Value="#00000000" />
            <Setter Property="Foreground" Value="White" />
            <Setter Property="IsReadOnly" Value="True" />
        </Style>

        <!--Combobox opmaak-->
        <Style TargetType="ComboBox" >
            <Setter Property="BorderBrush" Value="White" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Background" Value="#00000000" />
            <Setter Property="Foreground" Value="Black" />
            <Setter Property="IsReadOnly" Value="True" />
        </Style>

        <!--Button opmaak-->
        <Style TargetType="Button" >
            <Setter Property="OverridesDefaultStyle" Value="True" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Name="border" 
                            BorderThickness="2"
                            BorderBrush="White" 
                            CornerRadius="0" 
                            Background="#FFB5BBBB">
                            <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="border" Property="CornerRadius" Value="5" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="border" Property="Background" Value="White" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </Window.Resources>
    <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown" Name="mainGrid">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1207*" />
            <ColumnDefinition Width="137*" />
        </Grid.ColumnDefinitions>
        <Grid.Background>
            <ImageBrush ImageSource="/Images/background.jpg" Stretch="UniformToFill" TileMode="None" />
        </Grid.Background>
        <Image Height="15" HorizontalAlignment="Left" Margin="112,12,0,0" Name="btnClose" Stretch="Fill" VerticalAlignment="Top" Width="15" ForceCursor="False" Cursor="Hand" Source="/Images/btnClose.png" MouseDown="btnClose_MouseDown" Grid.Column="1" />
        <Image Height="15" HorizontalAlignment="Left" Margin="86,12,0,0" Name="btnMinimize" Stretch="Fill" VerticalAlignment="Top" Width="15" ForceCursor="False" Cursor="Hand" Source="/Images/btnMin.png" MouseDown="btnMinimize_MouseDown" Grid.Column="1" />
        <Image Height="15" HorizontalAlignment="Left" Margin="60,12,0,0" Name="btnAbout" Stretch="Fill" VerticalAlignment="Top" Width="15" ForceCursor="False" Cursor="Hand" Source="/Images/btnAbout.png" Grid.Column="1" MouseDown="btnAbout_MouseDown"/>
        <Canvas Height="716" HorizontalAlignment="Left" Margin="12,40,0,0" Name="canvas1" VerticalAlignment="Top" Width="1342" Background="#FFB5BBBB" Grid.ColumnSpan="2">
            <ListView Canvas.Left="7" Canvas.Top="169" Height="420" Name="lstClients" Width="900" MouseRightButtonUp="lstClients_MouseRightButtonUp" AlternationCount="2" BorderThickness="2" BorderBrush="White" Foreground="White" ForceCursor="True" Cursor="Arrow">
                <ListView.View>
                    <GridView AllowsColumnReorder="true" >
                        <GridViewColumn Header="SSID" DisplayMemberBinding="{Binding Path=SSID}" />
                        <GridViewColumn Header="IP" DisplayMemberBinding="{Binding Path=IP}"/>
                        <GridViewColumn Header="MAC" DisplayMemberBinding="{Binding Path=MAC}"/>
                        <GridViewColumn Header="First seen" DisplayMemberBinding="{Binding Path=FirstSeen}"/>
                        <GridViewColumn Header="Last seen" DisplayMemberBinding="{Binding Path=LastSeen}"/>
                        <GridViewColumn Header="Hostname" DisplayMemberBinding="{Binding Path=Hostname}"/>
                    </GridView>
                </ListView.View>
                <ListView.Background>
                    <SolidColorBrush />
                </ListView.Background>
            </ListView>
            <Label Canvas.Left="7" Canvas.Top="44" Content="Networks:" Height="28" Name="lblNetworks" FontStyle="Normal" Width="83" />
            <ComboBox Canvas.Left="95" Canvas.Top="44" Name="cboxNetworkSSIDs" Width="225" Height="25" SelectionChanged="cboxNetworkSSIDs_SelectionChanged" />
            <Image Canvas.Left="327" Canvas.Top="44" Height="25" Name="btnRescan" Stretch="Fill" Width="25" Source="/Images/btnRescan.png" MouseDown="btnRescan_MouseDown" Cursor="Hand" />
            <Label Canvas.Left="550" Canvas.Top="76" Content="Signal strength:" Height="28" Name="label1" />
            <Label Canvas.Left="287" Canvas.Top="77" Content="Security:" Height="28" Name="label2" />
            <Label Canvas.Left="550" Canvas.Top="42" Content="First seen:" Height="28" Name="label3" />
            <Label Canvas.Left="550" Canvas.Top="8" Content="Last seen:" Height="28" Name="label4" />
            <TextBox Canvas.Left="646" Canvas.Top="111" Height="23" Name="txtNetworkSignalStrength" Width="153" IsReadOnly="True" />
            <TextBox Canvas.Left="358" Canvas.Top="79" Height="23" Name="txtNetworkSecurity" Width="186" IsReadOnly="True" />
            <TextBox Canvas.Left="618" Canvas.Top="44" Height="23" Name="txtNetworkFirstseen" Width="181" IsReadOnly="True" />
            <TextBox Canvas.Left="618" Canvas.Top="10" Height="23" Name="txtNetworkLastseen" Width="181" IsReadOnly="True" />            
            <Label Canvas.Left="358" Canvas.Top="44" Height="28" Name="lblStatus" Width="186" Foreground="White" />
            <Label Canvas.Left="287" Canvas.Top="111" Content="IP Address:" Height="28" Name="label5" />
            <Label Canvas.Left="7" Canvas.Top="77" Content="SSID:" Height="28" Name="label6" />
            <TextBox Canvas.Left="358" Canvas.Top="111" Height="23" Name="txtNetworkIP" Width="186" IsReadOnly="True" />
            <TextBox Canvas.Left="50" Canvas.Top="79" Height="23" Name="txtNetworkSSID" Width="231" IsReadOnly="True" />
            <Label Content="MAC:" Height="28" Name="label10" Canvas.Left="7" Canvas.Top="109" />
            <TextBox Canvas.Left="50" Canvas.Top="111" Height="23" Name="txtNetworkMac" Width="231" IsReadOnly="True" />
            <Label Canvas.Left="7" Canvas.Top="6" Content="Network adapters:" Height="28" Name="lblAdapters" />
            <ComboBox Canvas.Left="135" Canvas.Top="6" Height="25" Name="cboxAdapters" Width="409" SelectionChanged="cboxAdapters_SelectionChanged" >
                
            </ComboBox>
            <Button Canvas.Left="7" Canvas.Top="140" Content="Connect" Height="23" Name="btnConnect" Width="75" IsEnabled="False" Click="btnConnect_Click" Foreground="White" />
            <Button Canvas.Left="88" Canvas.Top="140" Content="Disconnect" Height="23" Name="btnDisconnect" Width="75" Click="btnDisconnect_Click" IsEnabled="False" Foreground="White" />
            <Image local:SupportAnimatedGIFBehviour.SupportAnimatedGif="True" Canvas.Left="912" Canvas.Top="169" Height="420" Name="imgRadar" Stretch="Fill" Width="420" Source="/Images/radar.gif" />
            <Canvas Canvas.Left="912" Canvas.Top="169" Height="420" Name="canvasRader" Width="420" />            
            <Button Canvas.Left="169" Canvas.Top="140" Content="Start capture" Height="23" Name="btnStartCapture" Width="125" IsEnabled="False" Click="btnStartCapture_Click" Foreground="White" />
            <ListBox Canvas.Left="7" Canvas.Top="595" Height="115" Name="lstConsole" Width="898" Foreground="#C8009600" ForceCursor="False" FontFamily="Consolas" Background="#C8000000" IsTextSearchEnabled="False" FontSize="12" BorderBrush="White" BorderThickness="2" />
            <Label Canvas.Left="550" Canvas.Top="111" Content="Signal quality:" Height="28" Name="label14" />
            <TextBox Canvas.Left="646" Canvas.Top="79" Height="23" Name="txtNetworkSignalQuality" Width="153" IsReadOnly="True" />
            <Button Canvas.Left="595" Canvas.Top="140" Content="Stop capture" Height="23" Name="btnStopCapture" Width="125" IsEnabled="False" Click="btnStopCapture_Click" Foreground="White" />
            <Label Canvas.Left="912" Canvas.Top="595" Content="Number of packets recieved:" Height="28" Name="label16" FontWeight="ExtraBold" ClipToBounds="False" SnapsToDevicePixels="False" />
            <Label Canvas.Left="1090" Canvas.Top="640" Content="..." Height="28" Name="lblPPS" Foreground="White" />
            <Label Canvas.Left="912" Canvas.Top="640" Content="Packets per second:" Height="28" Name="label17" FontWeight="ExtraBold" />
            <Label Canvas.Left="1090" Canvas.Top="595" Content="..." Height="28" Name="lblPacketsRecieved" Foreground="White" />
            <Label Canvas.Left="1090" Canvas.Top="661" Content="..." Height="28" Name="lblSeconds" Foreground="White" />
            <Label Canvas.Left="912" Canvas.Top="661" Content="Seconds scanned:" Height="28" Name="label15" FontWeight="ExtraBold" />
            <Image local:SupportAnimatedGIFBehviour.SupportAnimatedGif="True" Canvas.Left="300" Canvas.Top="140" Height="23" x:Name="imgScanning" Stretch="Fill" Width="289" Source="/Images/loadingbar.gif" Visibility="Visible" />
            <Label Canvas.Left="912" Canvas.Top="618" Content="Number of packets dropped:" Height="28" Name="label18" FontWeight="ExtraBold" />
            <Label Canvas.Left="1090" Canvas.Top="618" Content="..." Height="28" Name="lblPacketsDropped" Foreground="White" />
            <Label Canvas.Left="912" Canvas.Top="682" Content="Total data flow:" Height="28" Name="label19" FontWeight="ExtraBold" />
            <Label Canvas.Left="1090" Canvas.Top="682" Content="..." Height="28" Name="lblBytes" Foreground="White" />
            <Button Canvas.Left="726" Canvas.Top="140" Content="History" Height="23" Name="btnHistory" Width="75" Click="btnHistory_Click" Foreground="White" />
        </Canvas>
        <GroupBox Header="Personal info" Height="160" Name="groupBox1" Margin="818,43,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="526" Grid.ColumnSpan="2">
            <Grid>
                <Label Content="Adapter name: " Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="label8" VerticalAlignment="Top" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="100,8,0,0" Name="txtAdapterName" VerticalAlignment="Top" Width="408" IsReadOnly="True" />
                <Label Content="Connected to:" Height="28" HorizontalAlignment="Left" Margin="6,40,0,0" Name="label11" VerticalAlignment="Top" />
                <TextBox Height="23" Margin="100,42,0,0" Name="txtAdapterConnectedNetwork" VerticalAlignment="Top" HorizontalAlignment="Left" Width="129" IsReadOnly="True" />
                <Label Content="Signal strength:" Height="28" Name="label12" Margin="235,40,187,69" />
                <TextBox Height="23" Name="txtAdapterSignalStrength" Margin="333,42,6,72" IsReadOnly="True" />
                <Label Content="Adapter IP:" Height="28" Name="label9" Margin="6,74,440,35" />
                <TextBox Height="23" Name="txtAdapterIp" IsReadOnly="True" Margin="100,76,285,38" />
                <Label Content="Adapter MAC: " Height="28" Name="label7" Margin="235,106,191,3" />
                <TextBox Height="23" Name="txtAdapterMac" IsReadOnly="True" Margin="333,108,6,6" />
                <Label Content="Signal quality:" Height="28" HorizontalAlignment="Left" Margin="235,74,0,0" Name="label13" VerticalAlignment="Top" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="333,76,0,0" Name="txtAdapterSignalQuality" VerticalAlignment="Top" Width="175" IsReadOnly="True" />
                <Label Content="Subnetmask:" Height="28" HorizontalAlignment="Left" Margin="6,106,0,0" Name="label20" VerticalAlignment="Top" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="100,108,0,0" Name="txtSubnetmask" VerticalAlignment="Top" Width="129" IsReadOnly="True" />
            </Grid>
        </GroupBox>
        <Label Content="..." Height="40" Name="lblApplicationName" VerticalAlignment="Top" Foreground="White" FontWeight="ExtraBlack" FontSize="20" HorizontalContentAlignment="Center" Margin="515,0,378,0" />
    </Grid>
</Window>
